package com.dev.drawweb.utils;

import com.dev.drawweb.model.service.DrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class SecurityUtil {

    static DrawService drawService;

    @Autowired
    public void setDrawService(DrawService drawService){
        this.drawService=drawService;
    }

    public static boolean manaJurCheck(int userId,String drawName){
        return drawService.getDrawByIdAndName(userId,drawName)!=null;
    }
}
